package de.ludo.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import de.ludo.util.GameType;

/**
 * This class defines the Highscore
 * 
 * @author Felix
 * 
 */
@Entity
public class Highscore implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int highscoreId;

	private String username;

	@Enumerated(EnumType.STRING)
	private GameType gameType;
	private int score;

	public Highscore() {
		super();
	}

	public Highscore(String username, int score, GameType gameType) {
		this.username = username;
		this.gameType = gameType;
		this.score = score;
	}

	public String toString() {
		return this.username + ", Punkte: " + this.score;

	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUsername() {
		return this.username;
	}

	public void setGameType(GameType gameType) {
		this.gameType = gameType;
	}

	public GameType getGameType() {
		return this.gameType;
	}

	public void setScore(int score) {
		this.score = score;
	}

	public int getScore() {
		return this.score;
	}
}